package com.atguigu.gmall.realtime.app.dwd;

import java.util.ArrayList;

public class test {
    public static void main(String[] args) {
        //数组长度用length属性
        String[] arr = {"core","bean","context"};
        System.out.println("arr.length:"+arr.length);

        //字符串长度用length()方法
        String str = "Spring";
        System.out.println("str.length():"+str.length());

        //集合长度用size()方法
        ArrayList<String> list = new ArrayList<>();
        list.add(str);
        System.out.println("list.size():"+list.size());
    }
}
